package psico_test.appAdministrar;

import psico_test.appAdministrar.gui.ventanaAdministrador;
import psico_test.appAdministrar.gui.ventanaAdministrar;
import psico_test.users.Administrador;
import psico_test.users.Usuario;
import psico_test.psicoTest;

public class appAdministrar extends Thread
{
	private psicoTest psicoTest;
	private Thread gui;
	
	public appAdministrar(psicoTest psicoTest)
	{
		//Asignacion de variables
		this.psicoTest = psicoTest;
	}
	
	//Arranca la aplicación
	public void run()
	{
		if(this.psicoTest.getUsuario().isAdmin())
		{
			gui = new Thread(new ventanaAdministrador(this));
			gui.start();
		}
		else
		{
			gui = new Thread(new ventanaAdministrar(this));
			gui.start();
		}
	}
	
	public void salir()
	{
		gui.interrupt();
		psicoTest.stopAppAdministrar();
	}

	public void login(String text, String text2)
	{
		
	}
}
